<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <meta http-equiv="X-UA-Compatible" content="ie=edge" />
        <title>03.找出字符串中的所有数字</title>
        <script>
            // 正则的方式来查找
            var str = 'fdfjoe34rlemkdf274ldfldf6ldflldlfdf909';
            function findNumber (str) {
                return str.match(/\d+/g);
            }

            // result：[34, 274, 6, 909]
            alert(findNumber (str));
        </script>
    </head>
    <body>

    </body>
</html>
